/* Toast 容器 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    /* 防止点击穿透 */
    user-select: none;
}

/* Toast 基础样式 */
.toast {
    width: 240px;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    color: white;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    will-change: transform, opacity;
    pointer-events: auto;
    /* 允许点击 */

    /* 进入动画 */
    animation: toast-in 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    transform-origin: center;
}

/* 退出动画 */
.toast.hide {
    animation: toast-out 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes toast-in {
    0% {
        opacity: 0;
        transform: translateX(120%) translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateX(0) translateY(var(--offset-y));
    }
}

@keyframes toast-out {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(var(--offset-y));
    }

    100% {
        opacity: 0;
        transform: translateX(120%) translateY(var(--offset-y));
    }
}

/* 内容区域 */
.toast-content {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 图标样式 */
.toast-icon {
    display: inline-flex;
    margin-right: 10px;
    flex-shrink: 0;
}

.toast-svg {
    width: 18px;
    height: 18px;
}

/* 消息文本 */
.toast-message {
    flex: 1;
    word-break: break-word;
}

/* 类型配色 */
.toast-success {
    background-color: #67c23a;
}

.toast-error {
    background-color: #f56c6c;
}

.toast-warning {
    background-color: #e6a23c;
}

.toast-info {
    background-color: #909399;
}

/* 模态框遮罩点击震动反馈 */
.confirm.modal-shake {
    animation: modalShake 0.3s ease-in-out;
}

@keyframes modalShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}